<%@ page import="com.minxi.jsp.javabean.UserInfo" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 22145
  Date: 2024/6/5
  Time: 21:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生管理系统首页</title>
</head>
<body>
<%
    String path = request.getContextPath();
    List<UserInfo> userlist = (List<UserInfo>) request.getSession().getAttribute("userlist");
%>
<h1>学生管理系统首页</h1>
<div class="a_container">
    <a href="<%=path%>/jsp/index.jsp" class="a_btu">注销</a>
</div>

<hr>
<table>
    <tr>
        <th>编号</th>
        <th>用户名称</th>
        <th>手机号</th>
        <th>性别</th>
        <th>操作</th>
    </tr>

    <% for(UserInfo userInfo : userlist){%>
    <tr>
        <td><%=userInfo.getId()%></td>
        <td><%=userInfo.getUser_name()%></td>
        <td><%=userInfo.getUser_phone()%></td>
        <td><%="男" == userInfo.getUser_gender() ? "男" : "女"%></td>
        <td>
            <a href="<%=path%>/detail?id=<%=userInfo.getId()%>">修改</a>
            <a href="<%=path%>/detail1?id=<%=userInfo.getId()%>">查看详情</a>
            <a href="<%=path%>/del?id=<%=userInfo.getId()%>">删除</a>
        </td>
    </tr>
    <%}%>
</table>
</body>
</html>
